Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Appends slashes to urls - #1064

Closed
umurkontaci wants to merge 1 commit into
angular:masterfrom
umurkontaci:master
Closed

umurkontaci wants to merge 1 commit into
angular:masterfrom
umurkontaci:master

Conversation

@umurkontaci

Copy link
Copy Markdown
Contributor

Angular intenionally removes slashes from urls defined in ngResource and this causes bugs and problems in frameworks like django. It simply adds slashes to urls for it work.

@m6w6

m6w6 commented Jul 3, 2012

Copy link
Copy Markdown

wat? A slash after the query? That doesn't look right.

@umurkontaci

Copy link
Copy Markdown
Contributor Author

#992

@ghost ghost assigned mhevery Sep 4, 2012
@mhevery

mhevery commented Sep 4, 2012

Copy link
Copy Markdown
Contributor

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).

CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form):
http://code.google.com/legal/individual-cla-v1.0.html

For corporations (print, sign and scan+email, fax or mail):
http://code.google.com/legal/corporate-cla-v1.0.html

@mhevery

mhevery commented Sep 4, 2012

Copy link
Copy Markdown
Contributor

So after thinking about this some more, we are not going to accept this. Here are the reasons

@mhevery mhevery closed this Sep 4, 2012

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? You append a slash at the end of the url.

return url + (query.length ? '?' + query.join('&') : '') + '/';
foo?query1=1&query2=2/

I would made a bid for a line 297

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an old pull request has been rejected already, I've made a local fix for django users but raises other issues.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still facing the trailing slash issue with Django Rest Framework with Angular Resource.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants